<%@ page language="java" contentType="text/html; charset=utf8"
	pageEncoding="utf8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@include file="header.jsp"%>
<div id="container">
	<div id="content">
		<div class="profile">
			<h2>Мой профиль.</h2>
			<c:if test="${!empty currentUser}">
				<form:form method="post" action="editProfile"
					commandName="currentUser">

					<table>
						<tr>
							<td><form:label path="firstname">
				Имя
			</form:label>
							</td>
							<td><form:input path="firstname" />
							</td>
						</tr>
						<tr>
							<td><form:label path="lastname">
				Фамилия
			</form:label>
							</td>
							<td><form:input path="lastname" />
							</td>
						</tr>
						<tr>
							<td><form:label path="patronymic">
				Отчество
			</form:label>
							</td>
							<td><form:input path="patronymic" />
							</td>
						</tr>
						<tr>
							<td><form:label path="password">
				Пароль
			</form:label>
							</td>
							<td><form:input path="password" type="password" />
							</td>
						</tr>
						<tr>
							<td><form:label path="email">
						Почта
					</form:label>
							</td>
							<td><c:out value="${currentUser.email}" />
							</td>
						</tr>
						<tr>
							<td><form:label path="groupId">
						Группа
					</form:label>
							</td>
							<td><form:input path="groupId" />
							</td>
							<form:input type="hidden" path="rating"
								value="${currentUser.rating}" />
							<form:input type="hidden" path="email"
								value="${currentUser.email}" />
							<form:input type="hidden" path="id" value="${currentUser.id}" />
							<form:input type="hidden" path="authority" value="ROLE_USER" />
						</tr>
						<tr>
							<td colspan="2"><input type="submit" value="Применить" />
							</td>
						</tr>
					</table>
				</form:form>
			</c:if>
		</div>
	</div>
	<!-- #content-->
</div>
<!-- #container-->
<div class="sidebar" id="sideLeft">
	<c:import url="menu.jsp" />
</div>
<!-- .sidebar#sideLeft -->
<%@include file="footer.jsp"%>